{# default Sliding pagination control implementation #}

{% if pageCount > 1 %}
<ul class="pagination">
    {% if first is defined and current != first %}
    <li>
        <a href="{{ path(route, query|merge({(pageParameterName): first})) }}">Primero</a>
    </li>
    {% endif %}

    {% if previous is defined %}
    <li>
        <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">«</a>
    </li>
    {% endif %}

    {% for page in pagesInRange %}
        {% if page != current %}
    <li>
        <a href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
    </li>
        {% else %}            
    <li class="active">
        <a href="#">{{ page }}</a>
    </li>
        {% endif %}

    {% endfor %}

    {% if next is defined %}
    <li class="next">
        <a href="{{ path(route, query|merge({(pageParameterName): next})) }}">»</a>
    </li>
    {% endif %}

    {% if last is defined and current != last %}
    <li>
        <a href="{{ path(route, query|merge({(pageParameterName): last})) }}">Último</a>
    </li>
    {% endif %}
</ul>
{% endif %}
